<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog"
                exclude-result-prefixes="cat"
                version="1.0">

   <xsl:output indent="yes"/>

   <xsl:param name="catalog" select="/.."/>

   <xsl:template match="node()">
      <xsl:copy>
         <xsl:copy-of select="@*"/>
         <xsl:apply-templates/>
      </xsl:copy>
   </xsl:template>

   <xsl:template match="cat:nextCatalog[@catalog = $catalog]"/>
   <xsl:template match="cat:delegateSystem[@catalog = $catalog]"/>
   <xsl:template match="cat:delegateURI[@catalog = $catalog]"/>

</xsl:stylesheet>
